package com.gzlg.hospital.dao;

import com.gzlg.hospital.pojo.Appointment_details;
import com.gzlg.hospital.pojo.Medical_record;
import com.gzlg.hospital.pojo.Patient;
import com.gzlg.hospital.pojo.Registration;
import com.gzlg.hospital.pojo.query.hQuery;
import org.apache.ibatis.annotations.Mapper;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

@Mapper
@Repository
public interface PatientDao {
    public List<Patient> listPatientByName(hQuery hQuery);
    public List<Medical_record> listMedicalRecordByName(hQuery hQuery);
    public Patient getPatientByName(String name);


    public Patient  getPatientById(Integer id);

    //患者登录
    public Patient getPatientByAccount(String account);
    /**
     * 患者自己的病历记录
     */
    public List<Medical_record> getMedicalRecordByPatientID(Integer patient_id);
    //患者根据病历id查询病历
    public List<Medical_record> getMedicalRecordByIdPatientID(Map<String,Integer> map);

    //患者挂号
    public int insertRegistration(Registration registration);

    //患者查询挂号信息
    public List<Registration> listRegistrationById(Integer patient_id);

    //患者通过挂号id查询挂号信息
    public List<Registration> getRegistrationByIdPatientId(Map<String,Integer> map);
    //患者处理挂号
    public List<Appointment_details> listAppointmentDetailsByPatientId(Integer patient_id);
    //患者通过挂号id查询处理挂号信息
    public List<Appointment_details> listAppointmentDetailsByRegistrationIdPatientId(Map<String,Integer> map);
    //患者注册
    public Boolean insertPatient(Patient patient);
}
